#pragma once
#include "audio_input.h"
#include "audio_sound.h"
#include "audio_listener.h"
#include "refc_ptr.h"
#include "vector3.h"

using namespace krryn::math;

namespace krryn{
namespace audio{
	class sound_3d : public input{
	public:
		typedef core::refc_ptr<sound_3d> ptr;

		sound_3d(sound::ptr a_Input, listener::ptr a_Listener, const vector3f &a_Position);

		void loop(bool a_Loop);
		float volume();
		void set_volume(float a_Volume);
		void set_position(const vector3f &a_Position);

		vector3f position();

		virtual sample::ptr next(int a_MilliSeconds);
		virtual void reset();
		virtual bool more();
	private:
		vector3f m_Position;
		listener::ptr m_Listener;
		sound::ptr m_Input;
	};
}
}
